<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.w3.org/1999/xhtml">
<head>
    <th:block th:include="include :: header('新增论文选题')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-title-add">
            <div class="form-group">
                <input name="thesisType" class="form-control" type="hidden" value="1" shiro:lacksRole="student">
                <input name="thesisType" class="form-control" type="hidden" value="2" shiro:hasRole="student">
                <label class="col-sm-3 control-label is-required">题目名称：</label>
                <div class="col-sm-8">
                    <input name="thesisName" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">题目介绍：</label>
                <div class="col-sm-8">
                    <textarea name="thesisDesc" class="form-control"></textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">学年：</label>
                <div class="col-sm-8">
                    <input name="academicYear" class="form-control" type="text" readonly th:value="${@config.getKey('thesis.title.academicYear')}">
                </div>
            </div>
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">指导教师工号：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <input name="thesisTeacherUser.loginName" class="form-control" type="text">-->
<!--                </div>-->
<!--            </div>-->
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "thesis/title"
        $("#form-title-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-title-add').serialize());
            }
        }
    </script>
</body>
</html>